package com.rednote.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rednote.entity.UserCollect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserCollectMapper extends BaseMapper<UserCollect> {
    int insert(UserCollect collect);
    int deleteById(Long collectId);
    int deleteByUserAndPost(@Param("userId") int userId, @Param("postId") int postId);
    UserCollect selectById(Long collectId);
    List<UserCollect> selectByUserId(int userId);
    boolean existsByUserIdAndPostId(@Param("userId") int userId, @Param("postId") int postId);
}
